<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Add User</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {	color: #666666;
	font-weight: bold;
}
.STYLE4 {color: #000000}
.STYLE5 {color: #666666}
-->
</style>
<style>
.form-invalid {
background-color:#FFFFFF;
	border-color:#CC3300;
}
</style>
</head>
<body>
<script>
$(document).ready(function(){
 	
}
);
	function checkAndSubmit(){
		var form = document.getElementById("updateAdForm");
		form.submit();
	}
	function showUploadWindow(){
		var InfoW=620;
		var InfoH=400;
		var InfoUrl="edit/insert_images.action?uploadFolder=<%=com.windfone.common.Constant.UPLOAD_AD %>";
		var str=window.showModalDialog(InfoUrl,"","dialogWidth="+InfoW+"px;dialogHeight="+InfoH+"px;center=yes;help=no;resizable=no;status=no;scroll=no");
		if ( str != undefined){
			$("#imagepath").val(str);
			$("#imagepath1").attr("src","<%=contextPath%>/"+str);
		}
	}	
</script>
<div  align="center">更新用户</div>
<form method="post" action="updateAd.action" id="updateAdForm">

<table  width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"  align="center">
	<tr>
		<td   class="tdbgcolor1" width="20%" >名称:</td>
		<td   class="tdbgcolor1"><input size="50" type="text" name="name" id="name"    style="background:#CCCCCC"  value="<s:property value='adBean.position'/>" readonly="false"/>
		</td>
	</tr>
	<tr>
		<td  class="tdbgcolor2">连接地址:</td>
		<td  class="tdbgcolor2"><input type="text" name="url" id="url" size="50" value="<s:property value='adBean.url'/>" /></td>
	</tr> 
	<tr>
	<td class="tdbgcolor1" >连接打开方式:</td>
		<td class="tdbgcolor1"><input type="text" name="target" id="target" size="50" value="<s:property value='adBean.target'/>" /></td>
	</tr>
	<tr>		
	<td class="tdbgcolor2">文字:</td>
		<td class="tdbgcolor2"><input type="text" name="text" id="text" size="50" value="<s:property value='adBean.text'/>" /></td>
	</tr>		
 	<tr>
		<td  class="tdbgcolor1" >配件图片:</td>
	  	<td  class="tdbgcolor1"  nowrap="nowrap">
				<img src="<%=contextPath%>/<s:property value='adBean.imagepath'/>"  id="imagepath1" name="imagepath1" border="0"/> &nbsp; <input type="button" value="照片"  onClick="showUploadWindow()"/>
		</td>
	</tr>
	<tr>

		<td colspan="2" class="tdbgcolor2">
		<input type="hidden" name="imagepath" id="imagepath" value="<s:property value='adBean.imagepath'/>"/>
			<inut type="hidden" id="adId" name="adId" value="<s:property value='adBean.id'/>" />
			<input type="button" value="Save"  onclick="checkAndSubmit()"/>&nbsp;
			<input	type="button" value="reset" /> &nbsp;
			<input	type="button" value="返回"  onclick="javascript:window.history.back();" />
		</td>
</table>
</form>
</body>
</html>
